package sicnu.cs.ich.api.common.enums;

/**
 * 统一请求响应
 *
 * @author CaiKe
 */

public enum ResultEnum {
    // 请求响应码
    OK(200, "SUCCESS"),
    ERROR(500, "FAILURE"),
    UNAUTHORIZED(401, "当前访问无权限"),
    FORBIDDEN(403, "请求权限不足");

    Integer code;
    String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    ResultEnum() {

    }
}
